<template>
  <el-dialog
    @close="close"
    title="公告详情"
    :visible.sync="dialog"
    width="65%">
    <div class="tit_title002">
      <h1> {{data.title}}</h1>

    </div>
    <div class="tit_createTime002">
      {{data.createTime}}
    </div>
    <div class="tit_content002">
      <span class="ql-editor" v-html="data.content"  style="display: inline-block">{{data.content}}</span>
    </div>




  </el-dialog>
</template>
<script>
  import { addGiftSystemAPI , obtainedGiftSystemAPI , getGiftDetailAPI} from '@/api/gift'
  import { mapGetters } from 'vuex'
  import { quillEditor } from 'vue-quill-editor'; //调用编辑器
  import 'quill/dist/quill.core.css'
  import 'quill/dist/quill.snow.css'
  import 'quill/dist/quill.bubble.css'
  export default {
    name: 'LogDetail',
    props: {
      dialog_: {
        type: Boolean,
        default: false
      },
      id: {
        type: Number,
        default: null
      },
    data: {
      type: Object
    }
    },
    data() {
      return {
        props: {
          label: 'title',
          children: 'children'
        },
        dialog: false,
        formInline: {
          id: 0,
          status: 1,
        }
      }
    },
    computed: {
      ...mapGetters([
        'img_base_url',
      ])
    },
    methods: {

      close() {
        this.$emit('close')
      },
      addSubmit() {
        addGiftSystemAPI(this.formInline).then(res => {
          this.btnLoading = false
          if (res.code === 0) {
            this.$message.success('操作成功')
            this.$emit('success')
            this.dialog = false
          } else {
            this.$message.error(res.msg)
          }
        })
      }
    },
    mounted() {
      this.dialog = this.dialog_
      if (this.id) {
        this.getDetails() // 编辑查询详情
      } else {
        //this.getRouterAll() //新增查询菜单树信息
      }
    },
    computed: {
      editor() {
        return this.$refs.myQuillEditor.quill
      }
    }
  }
</script>
<style>
  .ql-editor{
    width: 100%;
    height: 100%;
  }
  .ql-editor p img{
    width: 100%;
    height: 100%;
  }
  .tit_title002 {
    text-align: center;
  }
  .tit_createTime002{
    text-align: center;

  }
  .tit_createTime002{
    text-align: center;

  }
</style>
